<!doctype html>

<html>

  <head>
    <meta charset="utf-8">
    <title>WASM validate() test</title>
  </head>

  <body>
    <script>
      fetch('simple.wasm').then(response =>
        response.arrayBuffer()
      ).then(function(bytes) {
        var valid = WebAssembly.validate(bytes);
        console.log("The given bytes are " + (valid ? "" : "not ") + "a valid wasm module");
      });
    </script>
  </body>

</html>
